package com.javafactroy.kunlong.data.valueobj;


import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import lombok.Data;

@Data
public class MetadataDict {

    String tableName;
    String tableComment;
    String pkeyField;

    BiMap<String, String> prop2ColMap;

    public MetadataDict() {
        tableName = "${tableName}";
        tableComment = "${tableComment}";
        pkeyField = "${pkey}";

        prop2ColMap = HashBiMap.create();
        //prop2ColMap.put();
        //${MapPut}
    }

    public String prop2Col(String prop) {
        return prop2ColMap.get(prop);
    }

    public String col2Prop(String prop) {
        return prop2ColMap.inverse().get(prop);
    }

}
